
public class Vegetable {
	private String name;
	
	public Vegetable(String name) {
		if ( name != null && !name.equals("") )
			this.name = name;
		else
			this.name = "";
	}
	
	@Override
	public String toString() {
	
		return name;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj != null && obj instanceof Vegetable)
			if ( ((Vegetable)obj).name != null && this.name != null)
				return ((Vegetable)obj).name.equals(this.name);
		return false;
	}
}
